<?php
	include 'Smarty.class.php';

	define("BASE_PATH", realpath((dirname(__FILE__))));
	$app = dirname(dirname(dirname(dirname($_SERVER['REQUEST_URI'])))) ;
	
	$uri = $_SERVER["REQUEST_URI"] ;
	
	$smarty=new Smarty();
	//连接数据库，获取数据
	$title="this is article title";
	$content="this is a article content";
	$smarty->assign("title", $title);
	$smarty->assign("content", $content);
	$smarty->assign("basepath", BASE_PATH);// /var/www/Smarty
	$smarty->assign("basepath1", $app);//  /
	$smarty->assign("requesturi", $uri);//
	
	$smarty->display("demo.html");
?>